home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_parent.player.status == "play" || _parent.player.status == "hit")
- {
- frame++;
- if(frame % num_frames_x == 0)
- {
- x += velx;
- }
- if(frame % num_frames_y == 0)
- {
- y += vely;
- }
- if(right < x)
- {
- x = right;
- velx *= -1;
- }
- else if(x < left)
- {
- x = left;
- velx *= -1;
- }
- if(bottom < y)
- {
- y = start_y;
- }
- this._x = x;
- this._y = y;
- }
- }
-